package com.conan.spring5.service.impl;

import com.conan.spring5.dao.BookDAO;
import com.conan.spring5.service.BookService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * @version 加油！！！
 * @Description
 * @Author 谷藤新一GYC
 * @Date 2022/10/21 - 16:03
 */
@Service
public class BookServiceImpl implements BookService {
    @Value(value = "abc")
    private String bookName;
//    @Resource类型注入
    @Resource(name = "bookDAOImpl1")//名称注入
    private BookDAO bookDAO;
    @Override
    public void add() {
        System.out.println("add service...."+bookName);
        bookDAO.add();
    }
}
   